home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)TB / (A)TBM.ADF / Utilities / Virus_Checker.doc < prev    next >
Text File  |  1991-05-23  |  21KB  |  447 lines

  1. Virus Checker
  2.  
  3.    This Program
  4.  
  5. Virus_Checker is a freely distributable, copyrighted piece of
  6. software. You do not have to pay money to use it, and may upload it
  7. wherever you choose, but you are not allowed to sell Virus_Checker
  8. for profit, or include Virus_Checker on a disk which is sold for
  9. profit, without the author's (John Veldthuis) permission.
  10. Commodore New Zealand Have this permission already
  11. I can be contacted at the address below.
  12.  
  13. Please send me any more viruses so I can update Virus_Checker
  14.  
  15. John Veldthuis
  16. 21 Ngatai Street
  17. Manaia, Taranaki
  18. New Zealand
  19. Phone  (0624) 8409
  20.  
  21. To use, place in your startup-sequence the following line
  22.  
  23. Virus_Checker
  24.  
  25. this will run virus_checker
  26. Upon running Virus_Checker will first check your memory for viruses
  27. and tell you if any were detected. They will either be removed or
  28. disabled. Next all disks in the drives will be checked. Any disk put
  29. into any drive (df0: to df3:) will be checked. The rest is easy
  30. Sometimes the machine may GURU when it disables the LAMER
  31. Exterminator virus in memory but if you reboot it should be gone.
  32.  
  33. Virus Checker will check the startup-sequence file for the Xeno
  34. virus. If it finds this virus it will let you check all the files on
  35. any drive for the virus. If you want to check a disk for this virus
  36. then put the disk in any drive. Make sure the Virus_Checker window is
  37. active, press and release the right mouse button. This will bring up
  38. a requester asking you which drive to check. Enter the drive name in
  39. the box, eg. DF0:, DH1:,RAD: etc. It will then check all the files on
  40. that drive. You can also enter directories if you want to eg, c:
  41. df0:c, df0:libs etc
  42.  
  43. If Virus_Checker brings a requester up that says a program just run
  44. has infected your memory with the Xeno Virus, it has already disabled
  45. it. You should immediatly check all files on the disks that are in
  46. the drives at that time. This means that a program that you just ran
  47. or a program some other program just ran is infected with the virus
  48. and all files should be checked to find out which one it was.
  49.  
  50. With viruses which use a RomTag I have decided to clear out all
  51. RomTags to make sure I remove the Viruses from the list. In doing
  52. this you will lose things like Recoverable ram disks such as RAD:,
  53. VD0: etc. If You have a virus make sure that you save anything in the
  54. ram disks that you want before rebooting. The ramdisks and others
  55. will disappear on a reboot. My policy is better safe than sorry.
  56.  
  57. V1.0  was an arp.library version
  58. V1.1  was an port to the normal libraries
  59. V1.2  had the ByteBandit virus detection added into it
  60. V1.3  had detection of the 3 Viruses in memory and removal of them
  61. V1.4  added code to detect + remove the Byte Warrior Virus from
  62.       memory and disk
  63. V1.41 found a slight bug when using DSM to disassemble this
  64.       the program was testing low memory instead of a value when
  65.       checking for the Revenge Virus
  66. V1.42 changed code to be assembled by the CAPE 68K assembler
  67.       which is much faster than A68k or Assem. Now also uses base
  68.       register addressing mode for data access
  69. V1.43 changed code to cut down executable code
  70. V2.0  added Pentagon, System Z, North Star, Obelisk and the
  71.       new IRQ virus which lives in files and not in the Boot Block
  72. V2.1  corrected a few little bugs in program
  73. V3.0  Did a listing of Source code and found many bugs
  74.       Did a major rewrite to clean it up and saved about 400 bytes
  75. V3.0  now checks for the viruses listed
  76.       SCA, AEK, Byte Bandit, Byte Warrior, Revenge, Pentagon Circle
  77.       System Z, North Star, Obelisk, Disk-Doktors and the latest IBM
  78.       type virus the IRQ virus.
  79. V3.01 got a new virus. Lamer Exterminator. added code to get rid of
  80.       it.
  81. V3.02 got a second Version of the LAmer Exterminator virus
  82. V3.03 After many requests decided to add checking of BootGirl
  83.       BootBlocks which where being registered as Non-Standard. It now
  84.       Just Ignores BootGirl BootBlocks
  85. V4.00 Updated to make better use of the Stack. Now store all
  86.       variables on the stack for a saving of 124 bytes in the
  87.       Executable
  88. V4.10 TimeBomb virus added to code
  89. V4.20 Altered startup code to start a separate process to avoid doing
  90.       a RunBack -2 Virus_checker
  91. V4.22 Added Gadaffi virus to checker
  92. V4.23 Found a potentially Fatal Error in Code When accessing Unit
  93.       Byte off the Stack.
  94. V4.24 Added Graffiti, Ultra Fox, and Phantasmumble Viruses
  95.       Don't actually have these last 3 viruses so Anyone please send
  96.       them To me if you find them. Still looking for the IRQ Virus as
  97.       well
  98. V4.25 Added BSG9 virus to code
  99. V4.26 Changed Error Checking on BSG9 virus a bit
  100. V4.27 Got the War Hawks virus and added it. Also added V3 of Lamer
  101.       exterminator virus. Changed checking for BSG9 virus. Now checks
  102.       when disk is inserted into drive
  103. V4.28 Found I was losing the memory that was used by the program when
  104.       it exited. This was caused by me not UnLoading the Segment used
  105.       for The program. Fixed
  106. V4.29 Found program got into a continuous loop when there where no
  107.       RomTags present in the system. Fixed
  108.       Also cut code size down a bit more by combining a few checks
  109. V4.30 Put further checking in for the BSG9 virus as sometimes the
  110.       checker would not find the file on the disk depending on which
  111.       directory it was in. Put VKill virus checking in, Also put
  112.       Ultra Fox and PVLProtector virus checking in
  113. V4.40 Put in DosSpeed virus and an Unknown virus. It does not have
  114.       any names at all
  115. V4.41 Stopped Requester that comes up after pulling disk out. 
  116. V4.42 Added JITR virus which was sent to me by Jonathan Potter (AUST)
  117. V4.43 Added MicroSystems virus checking to code and BootBlock
  118.       checking of the HCS II, Opapa, BackFlash, and Australian
  119.       Parasite viruses
  120. V4.44 Changed code around abit to get better use of tables
  121.       and added Xeno virus check for Memory only
  122. V5.00 Changed user interface to give a new look and better messages
  123. V5.01 Major Bug repaired. V5.00 GURU'ed when checking disk. Worked
  124.       with 68020 CPU but failed on standard Amiga's due to a bad
  125.       address.
  126. V5.02 Was not checking startup-sequence properly when disk was put in
  127.       3 1/2" drive when a filename was given as C:SetCPU or something
  128.       like that. Came up with a strange filename not being checked.
  129.       Fixed  Added second version of Byte Bandit Virus, Someone
  130.       hacked it Added code to remove Xeno virus from files
  131. V5.03 Slight bug corrected in code
  132. V5.04 Have changed this from PD to Freely Redistributable after an
  133.       offer from someone to sell Virus_Checker. I feel this still
  134.       needs to be at minimal (copying charge) or no charge to be
  135.       effective. Also cleaned up the code abit. This may introduce
  136.       new bugs so please tell me about them if you find them
  137.       Added checking of IRQ virus when checking for Xeno files on
  138.       disk. As the file is in the buffer already this adds very litle
  139.       extra time to the check. And better safe than sorry.
  140. V5.05 Changed text when Xeno Virus found after a program has been run
  141.       to warn that the program just run maybe the culprit
  142. V5.06 Added 16 Bit crew Virus, New Alien Beat Virus, Digital Emotions
  143.       virus, Graffiti Virus, two new versions of the Byte Bandit
  144.       virus, ScarFace virus, Turk virus, Joshua virus Also a little
  145.       bug when used with NTSC machines. You could not display
  146.       the Boot Block Sectors. Now Startup alters for which machine it
  147.       is on. The Startup code is only used once and then the memory
  148.       for it is freed.
  149.  
  150. *********************************************************************
  151. V5.07 Added better Error messages when an error occurs with Files.
  152.       It will now say File protected from deletion when the file is
  153.       protected instead of just saying could not open file.
  154.       Added Butonic virus to checker
  155. V5.08 Added Centurions virus to checker
  156.  
  157. *********************************************************************
  158.  
  159. NON-STANDARD BOOT CODE
  160.  - When Virus_Checker brings up a Requester that says the disk has
  161. non-standard boot code this means that the code in the boot block is
  162. not what should be there. This does not mean that it is a virus as
  163. many games use copy protection in their boot blocks. You should
  164. however be cautious if it is not a game. Do not replace the boot
  165. block if you are not sure. If something strange happens then please
  166. send a copy of the disk to me so that I can check it out. Here is a
  167. way of checking non-standard boot code 
  168. 1.      Format a blank disk so you know it is clear.
  169. 3.      Make sure all disks except the one just formated are write
  170.         protected
  171. 3.      Boot from the disk that you suspect.
  172. 4.      Place formatted disk in drive zero and then reboot.
  173. 5.      Take disk out of drive zero and turn off computer for about
  174.         30 secs.
  175. 6.      Run the Virus_Checker program. If the Virus_Checker finds
  176.         non-standard boot code on the newly formated disk you have
  177.         found a new virus. Please send it to me
  178.  
  179.   Viruses Dealt With:
  180.   -------------------
  181.  
  182. SCA
  183.  - The SCA is the simplest virus to deal with, as it's not actually
  184. DOING anything except hiding in memory, until you reboot. We just
  185. look at CoolCapture and fix it to get it out of RAM.
  186.  
  187. AEK
  188.  - This is a clone of the SCA virus and we get rid of it in the same
  189. manner
  190.  
  191. LSD 
  192.  - Another SCA clone and uses the same code
  193.  
  194. Byte Bandit  (Now 4 versions)
  195. (Amiga Freak)
  196.  - The Byte Bandit virus takes the DoIO() vector and re-directs it
  197. through itself. Thus, any attempt to read or write the boot block
  198. (ie, AmigaDOS trying to figure out what kind of disk it is) results
  199. in the BB writing itself onto that disk. We couldn't just rewrite the
  200. boot block, we have to get him out of RAM first. This virus also has
  201. an interrupt that crashes the machine every 5 minutes or so after
  202. it's infected a few of your disks. Ow.
  203. It stays in memory not via the Capture vectors, but by a Resident
  204. module. When machine looks crashed press these keys at the same time
  205. from left to right LAlt,LAmiga,Space,RAmiga,RAlt.
  206.  This will restore things for another 5 minutes
  207.  
  208. Revenge
  209.  - Basically, a Byte Bandit clone except it will bring up an obscene
  210. pointer a few minutes after you reboot. We treat it much like the
  211. byte bandit.
  212.  
  213. Byte Warrior
  214.  - Jumps right into 1.2 Kickstart. Won't work under 1.3. Hangs around
  215. via Resident struct, doesn't do any damage.
  216.  
  217. North Star/ StarFire
  218.  - Like SCA, hangs around via CoolCapture, killing CoolCapture kills
  219. the North Star.
  220.  
  221. Obelisk Softworks Crew
  222.  - Hangs around via CoolCapture, also watches reads of DoIO() (but
  223. doesn't infect EVERY disk - only ones you boot off of)
  224.  
  225. IRQ
  226.  - This is the FIRST Non-Bootblock Virus. It copies itself from place
  227. to place via the first executable program found in your
  228. startup-sequence. It SetFunction's OldOpenLibrary(), has a
  229. KickTagPtr, and lives in the first hunk of an infected program.
  230.  
  231. Pentagon Circle
  232.  - This one looks at the DoIO vector, and has a CoolCapture vector.
  233. It will write itself over any virus inserted, but not onto anything
  234. else. No danger, easy to eliminate. Holding left button while booting
  235. with this one shows different screen colour, but doesn't get rid of
  236. it.
  237.  
  238. HCS Virus
  239.  - Hooks into the System Z protector
  240.  
  241.  - This is another virus protector that can write itself to disks.
  242. Anything that spreads itself, under any name, is a virus. Doesn't do
  243. anything except during a reboot, then examines disks and writes over
  244. viruses.
  245.  
  246. Disk-Doktors
  247.  - This is another virus which looks at the DoIO routine for the
  248. reading of any bootblocks. If it finds one it will rewrite a copy of
  249. its code to it if it can. This one also patches into the Vertical
  250. Blank interrupt and seems to format you disk after a certain number
  251. of interrupts (can't be sure though).The nasty bit is it also creates
  252. a task called clipboard.device which spends its life copying itself
  253. through memory fragmenting the memory into small blocks. Calls ROM
  254. CODE direct so wont work under V1.3. We restore the DoIO routine, the
  255. Vert Blank interrupt and RemTask the clipboard.device
  256.  
  257. LAMER Exterminator
  258.  - This virus was sent to me by Andrew Mercer of the Palmerston North
  259. group. His letter said that He noticed strange things on his disks.
  260. On disassembling the virus I found that most of it was encrypted and
  261. the data was encrypted randomly using the beam position of the
  262. screen. Thus it appears different each time. It patches the
  263. trackdisk.device to look at reads and writes, It patches the Sumkick
  264. vector in exec in case someone tires to get rid of it. When it
  265. detects a read or a write it will randomly select a sector on the
  266. disk and will check if it is a data block. If it is it will write
  267. LAMER! all over the sector and rewrite it. Some say this Virus will
  268. write to write protected disks. I have not had this happen to me
  269. and I can see no special code in the disassembly to accomplish this
  270. feat.
  271.  
  272. TimeBomb Virus
  273.  - This is a strange Virus. It does not insert itself into any
  274. vectors. However it will copy itself back to the disk it came from.
  275.  When the count gets to 2 it will wipe out the Root Directory of the
  276. boot disk and display an alert. If the count is over 2 it will just
  277. display and alert
  278.  
  279. GADAFFI Virus
  280.  - Inserts itself into the CoolCapture vector, Uses a RomTag
  281. structure and patches the DoIO vector Jumps directly into the
  282. Kickstart so will only work under V1.2 Kickstart. After 13 copies it
  283. will Step the Heads of drives 0 and 1 in and out. We simply clear all
  284. vectors and Use the old V1.2 DoIO code entry point
  285.  
  286. BSG9 Virus 
  287. - This is similar to the IRQ virus in that it does not live in the
  288. Boot Block. It operates differently. Inserts itself into the RomTag
  289. pointer. It then loads the program it replaced and executes it. On
  290. Reboot the RomTag is called. It patches the Intuition OpenWindow
  291. Routine to its code. It then returns. Once AmigaDos opens up the CLI
  292. window the virus code gets run. This gets the startup-sequence file
  293. and gets the first command that is run. It then checks if it is
  294. already there. No, then it moves this program from it's directory
  295. into the devs:  directory and renames it a strange name.It then
  296. copies itself to replace the command it just moved. A give away is
  297. the file size. The Virus size is 2608 bytes and there will be a file
  298. with what looks like spaces for its name in the devs:  directory. To
  299. get rid of it, we copy the file in devs:  back to the c:  directory
  300. and rename it. Then delete the file in the devs: directory. In memory
  301. all we do is change the RT_INIT code which is run on reboot to do an
  302. immediate RTS The memory for the program is still used but the Virus
  303. is disabled. It will display a screen of its own which says, A
  304. Computer Virus is a disease
  305.  Terrorism is a Transgression
  306.  Software Piracy is a crime
  307.  This is the Cure
  308.  BSG9 plus some other junk
  309.  
  310. War Hawks 
  311. - This Virus installs itself into the CoolCapture Vector. It copies
  312. itself to the disk when the computer is warm booted. After every four
  313. copies it displays a message. To get rid of it we simply clear the
  314. CoolCapture vector
  315.  
  316. VKill Virus  
  317.  - This is another virus hidden as a Virus protector. When booted it
  318. copies itself to the stack area that is not used. It then patches the
  319. CoolCapture vector to survive a reboot. It patches the PutMsg vector
  320. of ExecBase to watch for BootBlock reads and writes. When it finds
  321. one it checks it and tells you if a virus is present. If you want to
  322. get rid of it it will copy itself to the disk. To remove it we Clear
  323. the CoolCapture Vector and SetFunction the PutMsg vector
  324.  
  325. Ultra Fox
  326.  - This one lives in the CoolCapture vector. When you reboot it will
  327. change the DoIO vector and wait for a BootBlock read. When it finds
  328. one and the disk is not already infected it will write itself to the
  329. bootblock. After every 16 copies it will put a custom copper list
  330. which displays greetings
  331.  
  332. PVLProtector
  333.  - This one is another bootblock protector. When it finds a virus it
  334. will write itself to the disk instead of a proper bootblock. All we
  335. do is set the RomTag to do a RTS
  336.  
  337. DosSpeed 
  338.  - This is another file virus. It is supposed to speed up disk
  339. operations by 800%. This was found on a BBS and when run patches
  340. itself into several places. It will read the s:startup-sequence file
  341. on reboot and will edit it so that it runs itself as the program. It
  342. sticks out because the first line in the startup-sequence will be
  343. blank. When the Checker finds it look in the Root directory and you
  344. will find what looks like a blank filename. Virus Checker will rename
  345. this virus for you. You can then delete the virus and alter your
  346. startup-sequence to get rid of the first blank line
  347.  
  348. UnKnown
  349.  - This is a virus that has no names anywhere and will only work
  350. under V1.2 Kickstart.  Very easy to get rid of.
  351.  
  352. JITR Virus
  353.  - Very mild sort of virus this one. Only writes itself to the
  354. BootBlock. Does nothing else. Easily fixed by clearing the
  355. CoolCapture vector
  356.  
  357. MicroSystems
  358.  - Haven't got this one yet so can't tell you much about it. Just
  359. have to restore a vector in the Exec.library and clear the Exec
  360. CoolCapture vector.
  361.  
  362. Xeno Virus
  363.  - This virus is a very nasty one in the way that it infects all
  364. programs that can be run. It does not need the program to be run but
  365. even someone doing a list or dir on a disk when the virus is present
  366. will infect all those other files on disk. It patches into the
  367. DOS.library and takes over the OPEN,LOCK and LOADSEG calls in DOS.
  368. This way it can intercept the files being looked at. It will copy
  369. itself to the start of every runnable program and alter the file so
  370. that it still works. There is also an encrypted message which says
  371. 'Greetings from the Xeno Virus' but I hav not worked out when this
  372. appears yet. To get rid of it from memory we have to reset the
  373. changed vectors. To get rid of it from the file is very much harder.
  374. First the file has to have the virus removed from the code. Then the
  375. relocation data pointers have to be changed so that everything still
  376. works. When Virus_Checker finds a file infected with the Xeno Virus
  377. it will tell you which file it is and bring up a requester. You can
  378. now check the files on drive zero for furthur viruses if you want. I
  379. will soon add a string gadget so that all drives can be checked.
  380.  
  381. 16 Bit Crew
  382.  - This virus does not do much and only infects disks that you boot
  383. with. To get rid of it from memory we clear the CoolCapture Vector
  384. and restore the DoIO vector.
  385.  
  386. New Alien Beat Virus
  387.  - This one will only work under Version 1.2 Kickstart as it jumps
  388. into the ROM code directly. To fix in memory we have to manually
  389. patch the DoIO vector and FindResident Vector with the correct values
  390. for 1.2. and clear the Capture vectors.
  391.  
  392. BlackFlash virus
  393.  - This virus will display a message after a certain ammount of
  394. copies of it has been made. It says that your computer is sick and
  395. has a virus. To remove it we just restore the DoIO vector and clear
  396. out the capture vectors.
  397.  
  398. Digital Emotions virus
  399.  - This is another tame virus. Only infects disks when it is
  400. rebooted. Clean out the Captures vectors and it is gone.
  401.  
  402. ScarFace Virus
  403.  - This takes over the BeginIO routine in the trackdisk.device to
  404. watch for reads and writes to the disk. When it finds one it will
  405. write itself to the disk. It also has a VertBlank intterupt which
  406. will do something after awhile. I think it only reboots the machine.
  407. It also has a romtag which we have to clear out.
  408.  
  409. Turk Virus
  410.  - Another simple virus. Does not do very much. Simple to get rid of
  411.  
  412. Joshua Virus
  413.  - Again, lives in the TrackDisk BeginIO and VertBlank Intterupt.
  414. Also has a RomTag to survive reboots. This one will display a sprite
  415. after so many intterupts. I am not sure what it looks like but maybe
  416. someone wants to wait until it is triggered. It counts intterupts. It
  417. will also infect every disk but in the drive that is not write
  418. protected. Data in it that says something is encoded. To remove we
  419. simply restore the BeginIO code and VertBlank Interrupt and wipe out
  420. the RomTag.
  421.  
  422. Butonic Virus
  423.  - This is another file type virus. It uses the DoIO vector to check
  424. for reads to the Root Block of a disk. It wil then write the virus to
  425. the disk and add it to the startup-sequence as the first instruction.
  426. The filename of the virus and its comment make it invisible when
  427. doing a dir but shows up with a list. This will also bring up GURU
  428. messages and change the title of the active window to some german
  429. stuff. To get rid of it we clear the ROMTAG, restore the DoIO vector
  430. and delete the file off the disk. You will need to remove the blank
  431. line from the startup-sequence where the virus was.
  432.  
  433. Centurions Virus
  434.  - Another file type virus. It hooks into the Trackdisk BEGINIO
  435. vector and waits for reads to the boot block of a disk. It changes
  436. the SumKickData vector so that it will survive a checksum. To get rid
  437. of it in memory we simply kill the RomTag vector, restore the
  438. SumKickData vector and patch the trackdisk code it uses to skip over
  439. the virus. When it finds a read to the bootblock it will check the
  440. write protect. It will then find the startup-sequence and find the
  441. name of the first command. It then looks for the command in the root
  442. directory, then the c directory. Once found it adds itself to the
  443. front of the file and is run when the startup-sequence is run again.
  444. Signs of infection are that it adds 3916 bytes to the size of the
  445. file it infects. After every ten copies it will change the pointer to
  446. a smily face and a message will scroll across it
  447.